<?php

namespace App\Http\Middleware;

use App\Exceptions\TooManyRequestException;
use Illuminate\Routing\Middleware\ThrottleRequests;

class APIThrottleRequest extends ThrottleRequests
{
    protected function buildException($request, $key, $maxAttempts, $responseCallback = null)
    {
        throw new TooManyRequestException('手速太慢，请稍后再来～');
    }
}
